import { IsString, IsOptional, IsBoolean, IsUUID } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class UpdateFileDto {
  @ApiProperty({ description: '文件ID' })
  @IsUUID('4', { message: '文件ID格式不正确' })
  id: string;

  @ApiPropertyOptional({ description: '文件描述' })
  @IsOptional()
  @IsString({ message: '文件描述必须是字符串' })
  description?: string;

  @ApiPropertyOptional({ description: '文件标签' })
  @IsOptional()
  @IsString({ message: '文件标签必须是字符串' })
  tags?: string;

  @ApiPropertyOptional({ description: '是否公开访问' })
  @IsOptional()
  @IsBoolean({ message: '是否公开访问必须是布尔值' })
  isPublic?: boolean;
}
